/*-------------------------------------------------------------------------
* Purpose: Master file to create the tables and figures for 
Peer Effects and the Gender Gap in Corporate Leadership:Evidence from MBA Students"
Menaka Hampole, Francesca Truffa, and Ashley Wong
*-------------------------------------------------------------------------*/
set more off
clear all
version 14
set maxvar 32767
set scheme s2color
cap log close

* install packages
cap ssc install estout
cap ssc install ftools
cap ssc install coefplot
cap ssc install winsor2
cap ssc install binscatter
cap ssc install qqvalue
cap ssc install reghdfe
cap ssc install require
net install rscript, from("https://raw.githubusercontent.com/reifjulian/rscript/master") replace


* Set username (Change this based on the system username)
local path "FOLDER"


* Set adopath for ado-file	
adopath + "`path'"

* Set paths for the code/data/output
global replication "`path'"


*** Create empty directories if not downloaded ***
capture mkdir "${replication}/log"
capture mkdir "${replication}/output/graphs"
capture mkdir "${replication}/output/tables"
capture mkdir "${replication}/data/analysis"

global code "${replication}/code"
global data "${replication}/data"
global log "${replication}/log"
global output "${replication}/output"

* Log files to print output
log using "${log}/peer_effects_MBA_code_log.txt",replace

do "${code}/analysis_replication_maintext.do" 

do "${code}/analysis_replication_appendix.do" 

cap log close
exit
